<%@page import="com.glowdayz.common.DBHandler"%>
<%@page import="java.util.ArrayList"%>
<%@ page import="com.glowdayz.glowmee.dao.SecondCategoryDAO"%>
<%@ page import="com.glowdayz.glowmee.cmd.SecondCategoryCMD"%>
<%@ page language="java" contentType="text/xml; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page trimDirectiveWhitespaces="true" %>
<%
	String second = request.getParameter("second");

	if (!second.equals("default")) {
		int num = Integer.parseInt(second);
%>
<?xml version="1.0" encoding="utf-8" ?>
<keyword>
	<%
		DBHandler.getInstance().connect();
		SecondCategoryCMD cmd = SecondCategoryDAO.getInstance().getSecondCategory(num);
		String temp = cmd.getKeyWord().trim();
		String[] list = temp.split(",");
		for (int i=0; i<list.length; i++) {
	%>
		<item>
			<name><%= list[i].trim() %></name>
		</item>
	<%		
		}
	%>
	
</keyword>
<%	
		DBHandler.getInstance().disconnect();
	}
%>
